package com.jecy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by huijun on 16/11/23.
 */
@Controller
public class LoginController {

    @RequestMapping("/login.do")
    public String showUser(HttpServletRequest request,HttpServletResponse response) {
        String user = request.getParameter("user");
        if(user != null) {
            request.getSession().setAttribute("user",user);
        }
        return "redirect:html/index.html";
    }
}
